package org.csu.demo.domain;

import lombok.Data;

import java.util.Date;

@Data
public class LineItemVo {
    private LineItem lineItem;
    private OrderStatus orderStatus;

    public LineItemVo(int lineNumber, Cart cartItem , int orderId){
        LineItem lineItem1 = new LineItem();
        OrderStatus orderStatus1 = new OrderStatus();
        lineItem1.setLineNumber(lineNumber);
        orderStatus1.setLineNumber(lineNumber);
        lineItem1.setQuantity(cartItem.getCartList().getQuantity());
        lineItem1.setItemId(cartItem.getItem().getItemId());
        lineItem1.setUnitPrice(cartItem.getItem().getListPrice());
        orderStatus1.setStatus("P");
        orderStatus1.setTimeStamp(new Date());
        orderStatus1.setOrderId(orderId);
        lineItem1.setOrderId(orderId);
        this.lineItem = lineItem1;
        this.orderStatus = orderStatus1;
    }
    public LineItemVo(){

    }
}
